<?php
/**
 *  操作日志信息控制器
 */
namespace app\msgapi\controller;

use app\msgapi\service\HsoperateLogService;
use app\Request;

class HsoperateLog extends Base
{
    public function __construct(HsoperateLogService $service)
    {
        parent::__construct($service);
        $this->service = $service;
    }

    /**添加日志(前端),主要添加查看聊天记录日志
     * @param Request $request
     */
    public function addLog(Request $request)
    {
        $data = $request->only(['type','content','detail'],'post');
        return $this->service::addLog($data['type'],$request->adminid,$data['content'],$data['detail'] ? : '',false);
    }

}